import React from 'react';
import {Card, Button,message} from 'antd';
import './ui.less';


//简小精悍，简单的信息提示
export default class Messages extends React.Component {
    showMessage = (type) => {

        message[type]('恭喜，成功晋级！')

    };

    render() {
        return (
            <div>
                <Card title="全局message" className="card-wrap">

                    <Button type="primary" onClick={() => this.showMessage('success')}>success</Button>
                    <Button type="primary" onClick={() => this.showMessage('info')}>info</Button>
                    <Button type="primary" onClick={() => this.showMessage('warning')}>warning</Button>
                    <Button type="primary" onClick={() => this.showMessage('error')}>error</Button>
                    <Button type="primary" onClick={() => this.showMessage('loading')}>loading</Button>
                </Card>
            </div>
        )
    }

}
